package com.zld.smarket.controller;

import com.zld.smarket.pojo.User;
import com.zld.smarket.result.ResponseData;
import com.zld.smarket.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@CrossOrigin
public class LoginController {
    @Autowired
    private LoginService loginService;

    @RequestMapping(value = "/login")
    private ResponseData login(HttpServletRequest request, String username, String password){

        return loginService.getUser(request,username,password);
    }


}
